package com.youmans.msm.service.impl;


import com.youmans.msm.component.SmsComPonent;
import com.youmans.msm.service.MsmService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
@Slf4j
@Service
public class MsmServiceImpl implements MsmService {
    @Autowired
    SmsComPonent smsComPonent ;
    @Override
    public boolean send(String phone, String code) {
        //判断手机号是否为空
        if(StringUtils.isEmpty(phone)){
            return false ;
        }
        //整合短信服务
        //smsComPonent.sendSmsCode(phone,code);

        log.error("验证码："+code);
        return true;
    }
}
